import LoginView from '../views/LoginView.vue'
import Layout from '../views/layout/LayOut.vue'
// ? 公共路由
export const All = [

    {
        path: "/login",
        name: "login",
        component: LoginView,
        meta: {name: "0"}
    },
    {
        path: "/layout",
        name: "layout",
        meta: {name: "0"},
        component: () => import("../views/layout/LayOut.vue"),
    },

]
// ? 学生路由
export const Student = [
    {
        path: "/home",
        name: "home",
        component: Layout,
        meta: {name: "首页"},
        children: [{path: "/home", component: () => import('../views/HomeView.vue')}],
    },
    {
        path: "/home",
        name: "home",
        component: Layout,
        meta: {name: "成绩"},
    },
    {
        path: "/benyue",
        name: "benyue",
        component: Layout,
        children: [{path: "/benyue", component: () => import('../components/Student/BenYueView.vue')}],
        meta: {name: "本月成绩", rule: "admin"},
    },
    {
        path: "/jinnian",
        name: "jinnian",
        component: Layout,
        meta: {name: "每天听写成绩", rule: "admin"},
        children: [{path: '/jinnian', component: () => import('../components/Student/JinNianView.vue'), name: 'index'}]
    },

]
// ? 带权限的路由
export const Teacher = [
    {
        path: "/shenqing",
        name: "shenqing",
        component: Layout,
        meta: {name: "请假批准", rule: "admin"},
        children: [{
            path: '/shenqing',
            component: () => import('../components/Student/ShenQingView.vue'),
        }]
    },
]


export default {Student}
